#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "InputPin.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Action;

/// <summary>
/// ActionInputPin
/// An ActionInputPin is a kind of InputPin that executes an Action to determine the
/// values to input to another Action.
/// </summary>
class UMLMODEL_EXPORT ActionInputPin : public InputPin {

public: // Constructors and destructors
    explicit ActionInputPin(const QString& umlType="uml::ActionInputPin");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// fromAction getter
    /// The Action used to provide the values of the ActionInputPin.
    /// </summary>
    shared_ptr<Action> fromAction() const;

    /// <summary>
    /// fromAction setter
    /// The Action used to provide the values of the ActionInputPin.
    /// </summary>
    void setFromAction(shared_ptr<Action> value);

private: // Fields
    /// <summary>
    /// fromAction
    /// The Action used to provide the values of the ActionInputPin.
    /// </summary>
    shared_ptr<Action> fromAction_;

};

} // namespace uml
